import request from "@/utils/request";

// 获得订单提成分页
export function getAwardPage(data) {
  return request({
    url: "/order/award/page",
    method: "post",
    data: data,
  });
}

// 创建订单提成
export function CreateAwardPage(data) {
    return request({
      url: "/order/award/create",
      method: "post",
      data: data,
    });
}

// 修改提成
export function EditAwardPage(data) {
    return request({
      url: "/order/award/edit",
      method: "post",
      data: data,
    });
}

// 删除订单提成
export function DeleteAwardPage(query) {
  return request({
    url: "/order/award/delete",
    method: "get",
    params: query,
  });
}

// 导出订单提成 Excel
export function ExcelAwardPage(data) {
    return request({
      url: "/order/award/export-excel",
      method: "post",
      data: data,
      responseType: "blob",
    });
}

// 详情
export function getAwardInfo(data) {
    return request({
      url: "/order/award/info",
      method: "get",
      params: data,
    });
}

// 添加提成查询订单
export function getAwardOrder(query) {
  return request({
    url: "/order/get/order/award",
    method: "get",
    params: query,
  });
}

// 添加提成查询订单服务
export function getAwardorderServer(query) {
  return request({
    url: "/order/get/orderServer/orderId",
    method: "get",
    params: query,
  });
}

// 提成明细导出
// 导出订单提成 Excel
export function ExcelCommission(data) {
  return request({
    url: "/order/award/export-excel",
    method: "post",
    data: data,
    responseType: "blob",
  });
}

// 获得提成类型下拉框order/finance/ly/district
export function getAwardType(data) {
  return request({
    url: "/order/award/awardType",
    method: "post",
    data: data,
  });
}

// 区域报表
export function getDistrict(data) {
  return request({
    url: "/order/finance/ly/district",
    method: "post",
    data: data,
  });
}

// 查询管辖区域
export function getManagerDistrict(data) {
  return request({
    url: "/order/finance/ly/district/manager",
    method: "post",
    data: data,
  });
}